package br.com.statizo.financeiro.swt.filter;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.snoghertframework.swt.annotations.FilterComponent;
import org.snoghertframework.swt.filter.ApplicationFilter;
import org.snoghertframework.swt.util.impl.LayoutUtil;
import org.springframework.beans.factory.annotation.Autowired;

import br.com.statizo.financeiro.view.ResumoComposite;


@FilterComponent(description="Criando componente de resumo.")
public class CreateResumoCompositeFilter implements ApplicationFilter{

	@Autowired
	private TabFolder tabFolder;
	
	@Autowired
	private LayoutUtil layoutUtil;
	
	@Override
	public void doFilter() {

		 TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
		 tabItem.setText("Resumo");
		 
		 ResumoComposite resumo = new ResumoComposite(tabFolder, SWT.NONE);
		 layoutUtil.setFormData(resumo, 2, 30, 90, 90);
		 tabItem.setControl(resumo);
		
	}

}
